
/**
 * @file picture.c
 * @author      JinChengLong (https://gitee.com/Datejin/)
 * @brief      桌面图表，背景等
 * @version     0.1
 * @date        2023
 * 
 * @copyright   Copyright © 2025 by JinChengLong 
 * 
 * All rights reserved.
 * Unauthorized copying, reproduction, or redistribution of this file via any medium is strictly prohibited.  
 * Proprietary and confidential.
 *   
 */
#include "picture.h"
#include "W25Q64.h"


//picture_cun(0,...);//虚空
//	picture_cun(1,...);	//胖龙
//	picture_cun(2,...);	//机甲
//	picture_cun(3,...);//武装	
//	picture_cun(4,...);//K
//	picture_cun(5,...);//自拍教室
//	picture_cun(6,...);//头像
//	picture_cun(7,...);//寺庙
//	picture_cun(8,...);//黑白
//	picture_cun(9,...);//牌		*/



/*仅将100*96长度的
512*503像素点的
bmp图片存入W25Q64中*/

//将图片存入划分好的区域//便于擦除和覆盖



void picture_cun(uint16_t dijizhang,uint8_t GETA[])
{
	uint16_t i;
	i=dijizhang;
	

	W25Q64_clearerase(0+4096*5*i);
	W25Q64_clearerase(4096+4096*5*i);
	W25Q64_clearerase(4096*2+4096*5*i);
	W25Q64_clearerase(4096*3+4096*5*i);
	W25Q64_clearerase(4096*4+4096*5*i);
				
	neicun_write(0+20480*i,19200,GETA);
	
	
}


//读取划分好的照片//用19200元素的数组接收
void picture_du(uint16_t dijizhang,uint8_t randomA[])
{
	uint16_t i;
	i=dijizhang;
	W25Q64_readdata(0+20480*i,randomA,19200);
	
}

/*
LCD_ShowPicture(15,30,100,96,randomA);
1.8寸TFT-LCD屏
*/




/*5个扇区12张*/

/*存入图标*/

/*从0x0C8000地址存入*/
//void picture_1680sign(void)
//{
//		
//	W25Q64_clearerase(4096*5*40);
//	W25Q64_clearerase(4096+4096*5*40);
//	W25Q64_clearerase(4096*2+4096*5*40);
//	W25Q64_clearerase(4096*3+4096*5*40);
//	W25Q64_clearerase(4096*4+4096*5*40);

//	neicun_write(4096*5*40,1680,gImage_AA);
//	neicun_write(4096*5*40+1680,1680,gImage_SS);
//	neicun_write(4096*5*40+1680*2,1680,gImage_CC);
//	
//	
////	neicun_write(4096*5*40+1680*3,1680,...);
////	neicun_write(4096*5*40+1680*4,1680,...);
////	...	
//	
////	neicun_write(4096*5*40+1680*11,1680,...);
//}


/*存入图标*/

/*从0x0E1000地址存入*/


void picture_4800sign(uint32_t signadd ,uint8_t a[],uint8_t b[],uint8_t c[],uint8_t d[])
{
	
	
	W25Q64_clearerase(4096*5*45+4096*5*signadd);
	W25Q64_clearerase(4096*6*45+4096*signadd*5);
	W25Q64_clearerase(4096*7*45+4096*signadd*5);
	W25Q64_clearerase(4096*8*45+4096*signadd*5);
	W25Q64_clearerase(4096*9*45+4096*signadd*5);

	neicun_write(4096*5*45+4096*5*signadd,4800,a);
	neicun_write(4096*5*45+4096*5*signadd+4800,4800,b);
	neicun_write(4096*5*45+4096*5*signadd+4800*2,4800,c);	
	neicun_write(4096*5*45+4096*5*signadd+4800*3,4800,d);

}













